﻿
Imports System.ComponentModel
Imports FountainHead.ViewModel.Properties

Namespace Controls

    Public Class BaseControlViewModel
        Implements INotifyPropertyChanged

        Sub New()
        End Sub

        Private leftValue As Integer
        Public Property Left() As Integer
            Get
                Return leftValue
            End Get
            Set(ByVal value As Integer)
                If leftValue = value Then Return
                leftValue = value
                OnPropertyChanged(New PropertyChangedEventArgs("Left"))
            End Set
        End Property

        Private topValue As Integer
        Public Property Top() As Integer
            Get
                Return topValue
            End Get
            Set(ByVal value As Integer)
                If topValue = value Then Return
                topValue = value
                OnPropertyChanged(New PropertyChangedEventArgs("Top"))
            End Set
        End Property

        Private nameValue As String
        Public Property Name() As String
            Get
                Return nameValue
            End Get
            Set(ByVal value As String)
                If nameValue = value Then Return
                nameValue = value
                OnPropertyChanged(New PropertyChangedEventArgs("Name"))
            End Set
        End Property
        'Public Shared Instance As New LabelControlViewModel
        Public Event PropertyChanged(ByVal sender As Object, ByVal e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged

        Public Sub OnPropertyChanged(ByVal e As PropertyChangedEventArgs)
            RaiseEvent PropertyChanged(Me, e)
        End Sub


    End Class
End Namespace